//
//  ViewController.m
//  JSPatch
//
//  Created by lizp on 2016/12/19.
//  Copyright © 2016年 Apple05. All rights reserved.
//

#import "ViewController.h"
#import "GYJSPatchTextViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //语法参考   https://github.com/bang590/JSPatch/wiki/JSPatch-基础用法
    self.automaticallyAdjustsScrollViewInsets = YES;
    self.title = @"JSPatch热修复";
    
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    btn.frame = CGRectMake([UIScreen mainScreen].bounds.size.width/2 -50, 100, 100, 50);
    [btn setTitle:@"下一步" forState:UIControlStateNormal];
    btn.backgroundColor = [UIColor redColor];
    [btn addTarget:self action:@selector(btnClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
}

-(void)btnClick {
    
    GYJSPatchTextViewController *vc = [[GYJSPatchTextViewController alloc] init];
    [self.navigationController pushViewController:vc animated:YES];
}

@end
